import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class BillTitleNum extends StatelessWidget {
  final String title;
  final String unit;
  final String number;
  final TextStyle numberTextStyle;

  const BillTitleNum({
    Key key,
    this.title,
    this.unit,
    this.number,
    this.numberTextStyle,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Column(
        children: <Widget>[
          RichText(
            text: TextSpan(
              text: '$title',
              style: TextStyle(
                color: Colors.white.withOpacity(0.3),
                fontSize: 24.sp,
                height: 1,
              ),
              children: [
                TextSpan(
                  text: '/$unit',
                  style: TextStyle(
                    color: Colors.white.withOpacity(0.3),
                    fontSize: 22.sp,
                    height: 1,
                  ),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(
              top: 18.w,
            ),
            child: Text(
              '$number',
              style: numberTextStyle,
              overflow: TextOverflow.ellipsis,
            ),
          ),
        ],
      ),
    );
  }
}
